package org.arclib.time;

///
public class StopWatch
{
	// /
	public void start()
	{
		begin = Time.getTime();
	}

	// /
	public void stop()
	{
		end = Time.getTime();
		time = end - begin;
	}

	// / time in seconds
	public double seconds()
	{
		return time / 1000;
	}

	// / time in milliseconds
	public double milliseconds()
	{
		return time;
	}

	public void reset()
	{
		begin = end = time = 0;
	}

	// starting and ending times
	double begin, end;

	// end - begin
	double time;
}